//
//  YJDZFffment.h
//  XOWMSDK
//
//  Created by SKL on 2017/11/8.
//  Copyright © 2017年 SKL. All rights reserved.
//

#import <Foundation/Foundation.h>
@class XOWMProduct;

typedef NS_ENUM(NSInteger, XOWMPlatformStyle)
{
    XOWMPlatformStyleDefault = 1,
    XOWMPlatformStyleImage,
};

typedef NS_ENUM(NSInteger, XOWMPlatformColor)
{
    XOWMPlatformColorDefault = 1,
    XOWMPlatformColorRed,
    XOWMPlatformColorOrange,
    XOWMPlatformColorBlue,
    XOWMPlatformColorCustom,
};

typedef NS_ENUM(NSInteger, XOWMPlatformLayout)
{
    XOWMPlatformLayoutDefault = 1,
    XOWMPlatformLayoutStyle1,
    XOWMPlatformLayoutStyle2,
    XOWMPlatformLayoutStyle3,
    XOWMPlatformLayoutStyle4,
};

/**
 *@pragma 回调Block：
 *                1.XOWMPlatform在没有设置代理的时候，会通过block返回信息
 *                2.按照逻辑，只有登录注册会在不设置代理的情况下调用，所以，现阶段只返回登录注册相应信息
 */
typedef void(^callBack)(NSDictionary * dict);


/**
 *@pragma 回调delegate
 */
@protocol XOWMPlatformDelegate<NSObject>

/**
 *@pragma 登录注册回调交易回调(交易回调callback==nil)
 */
- (void)receiveCallBack:(NSDictionary *)callback;
@end


@interface XOWMPlatform : NSObject
@property (nonatomic, copy, readonly) NSString *accountID;//账号
@property (nonatomic, copy, readonly) NSString *account;//用户名
@property (nonatomic, copy, readonly) NSString *token;//token
@property (nonatomic, copy, readonly) NSString *appID;//
@property (nonatomic, copy, readonly) NSString *serviceHeader;//
@property (nonatomic, copy, readonly) NSString *publicKey;//
@property (nonatomic, copy, readonly) NSString *yx;
@property (nonatomic, copy, readonly) NSString *state;
@property (nonatomic, copy, readonly) NSString *passwordstate;
@property (nonatomic, copy, readonly) NSString *currentVersion;
@property (nonatomic, assign) callBack callback;
@property (nonatomic, weak) id<XOWMPlatformDelegate>delegate;

+ (instancetype)platform;

/**
 *@pragma 初始化(在application:didFinishLaunchingWithOptions:中注册)
 *@pragma appid           =    商户编号
 *@pragma serviceHeader   =    服务请求地址
 #@pragma key             =    公钥
 */
+ (void)registerXOWMPlatform:(NSString *)appID serviceHeader:(NSString *)serviceHeader publicKey:(NSString *)key;

+ (void)platformStyle:(XOWMPlatformStyle)style;
+ (void)platformLayout:(XOWMPlatformLayout)layout;
+ (void)platformColorType:(XOWMPlatformColor)type color:(UIColor *)color;
/**
 *@ pragma 登陆
 */
+ (void)prepareLogin;
/**
 *@ pragma 注册
 */
+ (void)prepareRegister;
/**
 *@ pragma 
 */
+ (void)zunbeizhifu:(XOWMProduct *)product;
+ (void)cancelzhifu;


- (void)sp_getUserName:(NSString *)followCount;
@end
//测试update
